/*
 * Copyright 2009 Gary Brown
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 *
 * Change History:
 * 7 Mar 2009 : Initial version created by gary
 */
package org.betonthemove.platform.betfair;

import org.betonthemove.platform.*;

public class BetfairMarket implements Market {

	private static final long serialVersionUID = 3292352992134275944L;

	public BetfairMarket() {
	}
	
	public void setMarketId(int id) {
		m_marketId = id;
	}
	
	public int getMarketId() {
		return(m_marketId);
	}
	
	public void setMarketName(String name) {
		m_marketName = name;
	}
	
	public String getMarketName() {
		return(m_marketName);
	}
	
	public void setMarketType(String type) {
		m_marketType = type;
	}
	
	public String getMarketType() {
		return(m_marketType);
	}
	
	public void setMarketStatus(String status) {
		m_marketStatus = status;
	}
	
	public String getMarketStatus() {
		return(m_marketStatus);
	}
	
	public void setStartDate(long startDate) {
		m_startDate = startDate;
	}
	
	public long getStartDate() {
		return(m_startDate);
	}
	
	public void setDueInPlay(boolean b) {
		m_dueInPlay = b;
	}
	
	public boolean isDueInPlay() {
		return(m_dueInPlay);
	}
	
	public boolean isInPlay() {
		return(isDueInPlay() && getBetDelay() > 0);
	}
	
	public void setBetDelay(int bd) {
		m_betDelay = bd;
	}
	
	public int getBetDelay() {
		return(m_betDelay);
	}
	
	public void setTotalAmountMatched(double total) {
		m_totalAmountMatched = total;
	}
	
	public double getTotalAmountMatched() {
		return(m_totalAmountMatched);
	}
	
	public void setMenuPath(String path) {
		m_menuPath = path;
	}
	
	public String getMenuPath() {
		return(m_menuPath);
	}
	
	public void setClosed(boolean closed) {
		m_closed = closed;
	}
	
	public boolean isClosed() {
		return(m_closed);
	}
	
	public void setSuspended(boolean suspended) {
		m_suspended = suspended;
	}
	
	public boolean isSuspended() {
		return(m_suspended);
	}
	
	public String toString() {
		return("Id="+m_marketId+" Name="+m_marketName+" Type="+
				m_marketType+" Status="+m_marketStatus+
				" TotalMatched="+m_totalAmountMatched+
				" BetDelay="+m_betDelay+
				" Path="+m_menuPath+
				" InPlay="+isInPlay());
	}
	
	private int m_marketId=0;
	private String m_marketName=null;
	private String m_marketType=null;
	private String m_marketStatus=null;
	private String m_menuPath=null;
	private long m_startDate=0;
	private boolean m_dueInPlay=false;
	private int m_betDelay=0;
	private double m_totalAmountMatched=0;
	private boolean m_closed=false;
	private boolean m_suspended=false;
}
